package com.goldsprite.gesturerecognizer.core;

public class GesturePoint {
	public float x;
	public float y;

	public GesturePoint(float x, float y) {
		this.x = x;
		this.y = y;
	}

	public GesturePoint copy() {
		return new GesturePoint(x, y);
	}

	public float distanceTo(GesturePoint other) {
		float dx = x - other.x;
		float dy = y - other.y;
		return (float) Math.sqrt(dx * dx + dy * dy);
	}

	@Override
	public String toString() {
		return String.format("(%.1f, %.1f)", x, y);
	}
}
